feat: added python/pip version check to make install#165
feat: added python/pip version check to make install#165
Conversation
|
Great job, no security vulnerabilities found in this Pull Request |
| @echo "Checking python version, venv and pip availability..." | ||
| @python3 -c 'import sys; exit(0 if sys.version_info >= (3,10) else 1)' \ | ||
| || (echo "You need Python 3.10 or higher. Please install it, e.g.: \n sudo apt install python3.10 python3.10-venv python3.10-dev" && exit 1) | ||
| @(python3 -m venv --help >/dev/null 2>&1 && python3 -m pip --version >/dev/null 2>&1) \ | ||
| || (echo "Python venv and/or pip are not available. Please install them, e.g.: \n sudo apt install python3.10-venv python3.10-dev python3-pip" && exit 1) | ||
|
|
There was a problem hiding this comment.
in general this is still a suboptimal solution, because we need specific things installed on the host, and we can't really control them. the way forward is to use something like uv to manage all the deps we need internally
There was a problem hiding this comment.
by saying it won't work because the commands a bad, i.e. you have to use 'brew' instead? But the makefile will actually run, correct? if so maybe we check in and update later
There was a problem hiding this comment.
or you saying version check may fail incorrectly, just causing install to fail where it wouldn't have?
There was a problem hiding this comment.
this line:
@python3 -c 'import sys; exit(0 if sys.version_info >= (3,10) else 1)' \
is problematic, for example, on my computer:
❯ python3 --version
Python 3.9.6

Make install was failing on bad python version or if missing python with pip. Added checks for that.